Carbon


MakeITable

Header: Quickdraw.h Carbon status: Supported

Generates an inverse table for a color table. Your application should not need to call this function; it is used by system software only.

void MakeITable (
    CTabHandle cTabH, 
    ITabHandle iTabH, 
    SInt16 res
);
Parameter descriptions
cTabH

The color table for which an inverse table is to be generated.Passing NULL substitutes an appropriate handle from the current GDevice data structure

iTabH

The generated inverse table.Passing NULL substitutes an appropriate handle from the current GDevice data structure

res

The resolution needed for the inverse table. Passing 0 substitutes the current GDevice data structure’s inverse table resolution.

DISCUSSION

The MakeITable function generates an inverse table based on the current contents of the color table pointed to by the cTabH parameter, with a resolution specified by the value in the res parameter. Reserved color table pixel values are not included in the resulting color table. MakeITable tests its input parameters and returns an error in QDError if the resolution is less than three or greater than five.

This function allows maximum precision in mapping colors, even if colors in the color table differ by less than the resolution of the inverse table. Five-bit inverse tables are not needed when drawing in normal Color QuickDraw modes. However, Color QuickDraw transfer modes such as add, subtract, and blend may require a 5-bit inverse table for best results with certain color tables. The 'mitq' resource governs how much memory is allocated for temporary internal structures; this resource type is for internal use only.

Depending on the requested resolution, building the inverse table can require large amounts of temporary space in the application heap: twice the size of the table itself, plus a fixed overhead of 3–15 KB for each inverse table resolution.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)